Namespace Aricie.DNN.Caching.Client.Velocity
    Public Class AppFabricCallBackAdapter
        Inherits CacheCallBackAdapter

        Public Sub New(ByVal itemRemovedCallBack As CacheItemRemovedCallback)
            MyBase.New(itemRemovedCallBack)
        End Sub

        Public Overloads Sub OnCacheNotificationCallBack(ByVal myCacheName As String, _
                                                         ByVal myRegion As String, _
                                                         ByVal myKey As String, _
                                                         ByVal itemVersion As Microsoft.ApplicationServer.Caching.DataCacheItemVersion, _
                                                         ByVal operationId As Microsoft.ApplicationServer.Caching.DataCacheOperations, _
                                                         ByVal nd As Microsoft.ApplicationServer.Caching.DataCacheNotificationDescriptor)

            If operationId = Microsoft.ApplicationServer.Caching.DataCacheOperations.RemoveItem AndAlso myKey IsNot Nothing Then
                Me.OnCacheNotificationCallBack(myKey, Nothing, CacheItemRemovedReason.Removed)

            End If

        End Sub

    End Class
End Namespace